package com.qianfeng.vhly.youshare.fragments;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.qianfeng.vhly.youshare.Constants;
import com.qianfeng.vhly.youshare.R;

/**
 * Created with IntelliJ IDEA.
 * User: vhly[FR]
 * Date: 15/2/4
 * Email: vhly@163.com
 */

/**
 * 教程界面显示图片的部分，这个Fragment通过传递的参数显示不同的教程界面
 */
public class TutorialImageFragment extends Fragment {

    public TutorialImageFragment() {
        // Default constructor do not delete this method.
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        // 可以获取Fragment 的参数

        Bundle arguments = getArguments();

        int layoutId = R.layout.fragment_tutorial_image_1;

        if (arguments != null) {
            layoutId = arguments.getInt(Constants.ARG_TUTORIAL_IMAGE_LAYOUT_ID, R.layout.fragment_tutorial_image_1);
        }

        return inflater.inflate(layoutId, container, false);
    }
}